﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace VisionCloud.Core.Model.Ms
{
    /// <summary>
    /// 城市表
    /// </summary>
    [Table("SysDistrict")]
    public class SysDistrict
    {
        [Key]
        [Column(TypeName = "varchar(10)")]
        public string Id { get; set; }

        [Column(TypeName = "varchar(10)")]
        public string ParentId { get; set; }

        [Column(TypeName = "varchar(100)")]
        public string Name { get; set; }

        [Column(TypeName = "varchar(5)")]
        public string PinyinHeadChar { get; set; }

        [Column(TypeName = "varchar(50)")]
        public string AdCode { get; set; }

        [Column(TypeName = "varchar(50)")]
        public string CityCode { get; set; }

        [Column(TypeName = "int4")]
        public DistrictLevelEnum Level { get; set; }

        [Column(TypeName = "varchar(50)")]
        public string Center { get; set; }

        [Column(TypeName = "varchar(50)")]
        public string PolyLine { get; set; }

        [Column(TypeName = "varchar(255)")]
        public string Remark { get; set; }

        [Column(TypeName = "bool")]
        public bool? IsHot { get; set; }
    }

    /// <summary>
    /// 行政区划级别枚举
    /// </summary>
    public enum DistrictLevelEnum
    {
        省份 = 1,
        城市 = 2,
        区县 = 3,
        镇街 = 4
    }
}